<template>
	<div class="container">
		<navigationBar title="我的明细"></navigationBar>
		<div class="content" :style="'padding-top: ' + (navigationBarHeight-1) + 'px;'">
			<div class="list">
				<template v-for="(item,index) in list">
					<!-- 商家 -->
					<div class="list-item" :key="index">
						<image class="left" :src="item.merchantAvatars || item.userAvatar" mode=""></image>
						<div class="right">
							<div class="head">
								<span class="name">{{item.merchantName ||item.userName}}</span>
								<span class="price">{{item.amount}}</span>
							</div>
							<div class="footer">
								<span
									class="desc">{{item.type == 1?'卖出商品':item.type == 2?'商家':item.type == 3?' ':'提现'}}</span>
								<span class="time">{{item.createTime}}</span>
							</div>
						</div>
					</div>
					<!-- 用户 -->
					<!-- <div class="list-item" :key="index" v-if="item.type == 1 || item.type == 4">
						<image class="left" :src="item.userAvatar" mode=""></image>
						<div class="right">
							<div class="head">
								<span class="name">{{item.userName}}</span>
								<span class="price">{{item.amount}}</span>
							</div>
							<div class="footer">
								<span
									class="desc">{{item.type == 1?'卖出商品':item.type == 2?'商家':item.type == 3?' ':'提现'}}</span>
								<span class="time">{{item.createTime}}</span>
							</div>
						</div>
					</div> -->
				</template>

			</div>
		</div>
		<div class="empty" v-show="false">
			<image class="empty-img" src="../../static/icon/icon_wumingxi.png" mode=""></image>
			<div class="title">暂无明显</div>
		</div>
	</div>
</template>

<script>
	import data from '@/js/my/billDetail/data.js';
	import methods from '@/js/my/billDetail/methods.js';
	import {
		mapState
	} from 'vuex';
	import navigationBar from '../../components/navigationBar.vue';
	export default {
		data,
		methods,
		onLoad() {
			this.getPageList()
		},
		onReachBottom() {
			this.getPageList()
		},
		onShow() {},
		onHide() {},
		components: {
			navigationBar
		},
		computed: {
			...mapState(['navigationBarHeight', 'userInfo'])
		}
	};
</script>
<style>
	page,
	uni-page {
		background-color: #FAFAFA !important;
	}
</style>
<style scoped lang="scss">
	@import '~@/style/my/billDetail.scss';
</style>